<!--
  ~ Licensed to the Apache Software Foundation (ASF) under one or more
  ~ contributor license agreements.  See the NOTICE file distributed with
  ~ this work for additional information regarding copyright ownership.
  ~ The ASF licenses this file to You under the Apache License, Version 2.0
  ~ (the "License"); you may not use this file except in compliance with
  ~ the License.  You may obtain a copy of the License at
  ~
  ~    http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  ~
  -->
<div
    fxLayout="row"
    class="draggable-pipeline-element"
    fxFlex="100"
    id="{{ element.appId || element.name.toLowerCase().replaceAll(' ', '_') }}"
    [attr.data-pe]="element.elementId"
    (mouseenter)="updateMouseOver(element.name)"
    (mouseleave)="updateMouseOver('')"
    data-cy="pipeline-element-icon-stand-row"
>
    <div fxFlex="50px">
        <div
            matTooltip="{{ element.name }}"
            [matTooltipPosition]="'above'"
            class="draggable-icon-editor tt"
            [ngClass]="activeCssClass"
        >
            <span id="container" class="pe-container">
                <sp-pipeline-element
                    id="pe-icon-stand-{{ element.appId }}"
                    style="margin-left: -3%"
                    [iconStandSize]="true"
                    [attr.data-cy]="'sp-pipeline-element-' + cypressName"
                    [pipelineElement]="element"
                ></sp-pipeline-element>
            </span>
        </div>
    </div>
    <div fxFlex fxLayoutAlign="start start" fxLayout="column">
        <div
            [ngClass]="{
                'element-name-hover': currentMouseOver,
                'element-name': !currentMouseOver
            }"
        >
            {{ element.name }}
        </div>
        <div
            class="element-description"
            *ngIf="currentMouseOver"
            fxLayoutAlign="start start"
        >
            <small>{{ element.description }}</small>
        </div>
    </div>
    <div fxLayoutAlign="end start" *ngIf="currentMouseOver">
        <button
            style="height: 20px"
            mat-raised-button
            color="accent"
            class="help-button-stand"
            data-cy="help-button-icon-stand"
            (click)="openHelpDialog(element)"
        >
            ?
        </button>
    </div>
</div>
